<?php
	if(isset($_POST['formlogin']) && isset($_POST['formpass']) ){
		$User	= $func->html_post('formlogin');
		$Pass	= $func->html_post('formpass');
						
		$Result	= $useradmin_class->GetByName($User);
		if(is_array($Result)){		
			if($Result[0]['password']==md5($Pass)){	
				$_SESSION['user_admin']			= $Result[0]['username'];								
				$_SESSION['user_admin_time']	= time();	
				$func->DelSession('user_fasle');		
			}else{
				$func->SetSession('user_fasle',$config_nc->Error_login);
			}
		}else{
			$func->SetSession('user_fasle',$config_nc->Error_login);
		}		
	}
	header('location:'.$WEB_DOMAIN.'/'.$WEB_ADMIN.'/');

?>
